package de.hhbk.azubiverwaltung.entites;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * The persistent class for the ausbilder database table.
 * 
 */
@Entity
@Table(name="ausbilder")
public class Ausbilder implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ausbilder_id", unique=true, nullable=false)
	private int ausbilderId;

	@Column(nullable=false, length=25)
	private String anrede;

	@Column(nullable=false, length=25)
	private String email;

	@Column(nullable=false, length=25)
	private String handynummer;

	@Column(nullable=false, length=25)
	private String nachname;

	@Column(nullable=false, length=25)
	private String telefonnummer;

	@Column(nullable=false, length=25)
	private String vorname;

	//bi-directional many-to-one association to Betrieb
    @ManyToOne(cascade=javax.persistence.CascadeType.ALL)
	@JoinColumn(name="firmen_id", nullable=false)
	private Betrieb betrieb;

	//bi-directional many-to-one association to Azubi
	@OneToMany(mappedBy="ausbilder")
	private List<Azubi> azubis;

    public Ausbilder() {
    }

	public int getAusbilderId() {
		return this.ausbilderId;
	}

	public void setAusbilderId(int ausbilderId) {
		this.ausbilderId = ausbilderId;
	}

	public String getAnrede() {
		return this.anrede;
	}

	public void setAnrede(String anrede) {
		this.anrede = anrede;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getHandynummer() {
		return this.handynummer;
	}

	public void setHandynummer(String handynummer) {
		this.handynummer = handynummer;
	}

	public String getNachname() {
		return this.nachname;
	}

	public void setNachname(String nachname) {
		this.nachname = nachname;
	}

	public String getTelefonnummer() {
		return this.telefonnummer;
	}

	public void setTelefonnummer(String telefonnummer) {
		this.telefonnummer = telefonnummer;
	}

	public String getVorname() {
		return this.vorname;
	}

	public void setVorname(String vorname) {
		this.vorname = vorname;
	}

	public Betrieb getBetrieb() {
		return this.betrieb;
	}

	public void setBetrieb(Betrieb betrieb) {
		this.betrieb = betrieb;
	}
	
	public List<Azubi> getAzubis() {
		return this.azubis;
	}

	public void setAzubis(List<Azubi> azubis) {
		this.azubis = azubis;
	}
	
}